package com.isp.common.web.request;

import com.fasterxml.jackson.annotation.JsonProperty;
import com.isp.common.model.enums.SortDirection;
import com.isp.common.model.vo.request.IBaseRequest;
import io.swagger.annotations.ApiModelProperty;

import java.util.Map;

/**
 * @author linsy
 * @version 1.0
 * @created 2024/9/22 10:18
 */
public class BasePageRequest implements IBaseRequest {

    @ApiModelProperty("页码")
    @JsonProperty(value = "page_num", defaultValue = "1")
    private Integer pageNum;
    @ApiModelProperty("页记录数")
    @JsonProperty(value = "page_size", defaultValue = "10")
    private Integer pageSize;
    @ApiModelProperty("排序字段")
    @JsonProperty(value = "sort")
    private String sortBy;
    @ApiModelProperty("排序方向")
    @JsonProperty(value = "direction", defaultValue = "ASC")
    private SortDirection direction;
    @ApiModelProperty("过滤参数")
    @JsonProperty(value = "filters")
    private Map<String, String> filters;
    @ApiModelProperty("搜索字段")
    @JsonProperty(value = "search")
    private Map<String, String> search;

}
